rolesystem.roles.auction
Class Auctioneer

java.lang.Object
  extended by rolesystem.roles.auction.Auctioneer

public abstract class Auctioneer
extends java.lang.Object

This role is the auctioneer of an auction. Keywords: auction, auctioneer.


Field Summary
static KnownEvent KE_askGood
          A bidder asks the description of the good on sale.
static KnownEvent KE_askKind
          A bidder asks the kind of the auction (English, Dutch...).
static KnownEvent KE_askSituation
          A bidder asks the current situation of the auction.
static KnownEvent KE_bid
          A bidder makes a bid.
static KnownEvent KE_pay
          A bidder pays.
static KnownEvent KE_putOnSale
          A seller puts a good on sale.
static KnownEvent KE_reqSale
          A seller requests to put a good on sale.
static java.lang.String ROLE_ID
          Role identifier.
 
Constructor Summary
Auctioneer()
           
 
Method Summary
static RoleAction auctionOver(int addressee)
          Notifies that the auction is over.
static RoleAction giveGood(int addressee, java.io.Serializable content)
          Gives a good.
static RoleAction notifyGood(int addressee, java.lang.String content)
          Notifies the good on sale.
static RoleAction notifyKind(int addressee, java.lang.String content)
          Notifies the kind of the auction.
static RoleAction notifySituation(int addressee, Situation content)
          Notifies the current situation of the auction.
static RoleAction pay(int addressee, Money content)
          Pays.
static RoleAction saleAccepted(int addressee)
          Notifies to a seller that its sale has been accepted.
static RoleAction saleRefused(int addressee)
          Notifies to a seller that its sale has been refused.
static RoleAction unsold(int addressee)
          Notifies to a seller that its good is unsold.
static RoleAction youWon(int addressee, Price content)
          Notifies to a bidder that it has won the auction and thus it must pay.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROLE_ID

public static final java.lang.String ROLE_ID
Role identifier.

See Also:
Constant Field Values

KE_reqSale

public static final KnownEvent KE_reqSale
A seller requests to put a good on sale. Sender role: Seller


KE_putOnSale

public static final KnownEvent KE_putOnSale
A seller puts a good on sale. Sender role: Seller Content: Characteristics of the sale, i.e. reserve price, good on sale and its description.


KE_askKind

public static final KnownEvent KE_askKind
A bidder asks the kind of the auction (English, Dutch...). Sender role: Bidder


KE_askGood

public static final KnownEvent KE_askGood
A bidder asks the description of the good on sale. Sender role: Bidder


KE_askSituation

public static final KnownEvent KE_askSituation
A bidder asks the current situation of the auction. Sender role: Bidder


KE_bid

public static final KnownEvent KE_bid
A bidder makes a bid. Sender role: Bidder Content: Bid.


KE_pay

public static final KnownEvent KE_pay
A bidder pays. Sender role: Bidder Content: Payment.

Constructor Detail

Auctioneer

public Auctioneer()
Method Detail

saleAccepted

public static RoleAction saleAccepted(int addressee)
Notifies to a seller that its sale has been accepted.

Parameters:
addressee - Seller

saleRefused

public static RoleAction saleRefused(int addressee)
Notifies to a seller that its sale has been refused.

Parameters:
addressee - Seller

unsold

public static RoleAction unsold(int addressee)
Notifies to a seller that its good is unsold.

Parameters:
addressee - Seller

pay

public static RoleAction pay(int addressee,
                             Money content)
Pays.

Parameters:
addressee - Seller
content - Payment.

notifyKind

public static RoleAction notifyKind(int addressee,
                                    java.lang.String content)
Notifies the kind of the auction.

Parameters:
addressee - Bidder
content - Kind of the auction (English, Dutch...).

notifyGood

public static RoleAction notifyGood(int addressee,
                                    java.lang.String content)
Notifies the good on sale.

Parameters:
addressee - Bidder
content - Description of the good on sale.

notifySituation

public static RoleAction notifySituation(int addressee,
                                         Situation content)
Notifies the current situation of the auction.

Parameters:
addressee - Bidder
content - Situation of the auction, i.e. proposed price, winning bidder and countdown state.

auctionOver

public static RoleAction auctionOver(int addressee)
Notifies that the auction is over.

Parameters:
addressee - Bidder

youWon

public static RoleAction youWon(int addressee,
                                Price content)
Notifies to a bidder that it has won the auction and thus it must pay.

Parameters:
addressee - Bidder
content - Price that must be paid.

giveGood

public static RoleAction giveGood(int addressee,
                                  java.io.Serializable content)
Gives a good.

Parameters:
addressee - Bidder
content - Good.